<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>氦闪</title>
    <link rel="icon" href="__PUBLIC__/web/images/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="__PUBLIC__/web/css/public.css">
    <link rel="stylesheet" href="__PUBLIC__/web/css/contact.css">
</head>
<body>
<header>
    <include file="Index/header"/>
</header>


<include file="Index/left"/>
<section>
    <div class="ly-content ly-cent">
        <div class="ly-title">
            关于氦闪
        </div>
        <ul class="ly-li">
            <dl>
                <div class="ly-h2">联系氦闪</div>
                <div class="ly-contact ly-show">
                    <ul class="ly-list">
                        <h2>请输入您的电子邮箱地址/电话号码</br>
                            我们会主动与您取得联系</h2>
                        <li>
                            <input type="text" name="contact" id="contact" class="ly-input" placeholder="请输入"/>
                        </li>
                        <!--<li>
                            <p><label for="checks"><input type="checkbox" id="checks"/> 我想用我的邮箱或手机接收关于氦闪新品的信息</label></p>
                            <p><label for="check"><input type="checkbox" id="check"/> 我接收隐私条款</label></p>
                        </li>-->
                        <li>
                            <a class="ly-submit">提交</a>
                        </li>
                    </ul>

                    <div class="ly-code">
                        <p> 请添加氦闪官方微信客服号！</p>
                        <img src="__PUBLIC__/web/images/service.png"/>
                    </div>
                </div>
            </dl>
            <dl>
                <div class="ly-h2">工作室地址</div>
                <div class=" ly-show">
                    {$address}
                </div>
            </dl>
            <dl>
                <div class="ly-h2">初创理念</div>
                <div class=" ly-show">
                    {$begin}
                </div>
            </dl>
            <dl>
                <div class="ly-h2">加入氦闪</div>
                <div class=" ly-show">
                    {$participate}
                </div>
            </dl>
        </ul>
    </div>
    <include file="Index/footer"/>
</section>
<div class="ly-menu-nav" data-id="1">
    <img src="__PUBLIC__/web/images/icon_menu.png" />
</div>
</body>
<script src="__PUBLIC__/web/js/jquery.min.js"></script>
<script src="__PUBLIC__/web/js/public.js"></script>
<script>
    $(".ly-li dl").eq(0).addClass("ly-cation");
    $(".ly-li").on("click", "dl", function () {
        $(this).addClass("ly-cation").siblings().removeClass("ly-cation")
    })

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }

    window.onload = function () {
        var id = getQueryString("id");
        $(".ly-li dl").removeClass("ly-cation");
        $(".ly-li dl").eq(id).addClass("ly-cation");
    }
    
    $('.ly-submit').click(function () {
        // alert($('#contact').val());
        $.ajax({
            url: "{:U('addContact')}",
            dataType:"json",
            data:{contact:$('#contact').val()},
            type:'POST',
            async:true,
            beforeSend:function(){

//                $("body").showLoading();
            },
            success:function(rst){
                console.log(rst);
                if(rst.code == '200') {
                    alert('反馈成功');
                    window.location.reload();
                } else {
                    alert(rst.msg);
                }
            },
            error: function(){
//                $("body").hideLoading();
//                    alert("错误");
            }

        });
    })
</script>
</html>





